package cn.itsource.ymcc.feign;

import cn.itsource.ymcc.doc.CourseDoc;
import cn.itsource.ymcc.result.JSONResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(value = "service-search",fallbackFactory = CourseSearchFeignFallbackFactory.class)
public interface CourseSearchFeign {
    @PostMapping("/course/save")
    JSONResult save(@RequestBody CourseDoc doc);

    @PostMapping("/course/delete/{id}")
    JSONResult delete(@PathVariable("id") Long id);
}
